package com.climb.spingcloud;

import com.climb.spingcloud.generator.MpGenerator;

public class CodeGenerator {
    public static void main(String[] args) {
        // 工程所在目录
        String projectPath = System.getProperty("user.dir");
        String projectName = "/shop-user/shop-user-aervice";
        String author = "filteraid";

        // 目前支持MySQL
        String url = "jdbc:mysql://localhost:3306/shop-user?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2b8&useSSL=false&allowPublicKeyRetrieval=true";
        String username = "root";
        String password = "123456";

        // 按驼峰命名的数据表名
        String[] tableNames = new String[]{ "shop_user" };
        // 去掉前缀后按驼峰命名来生成类名
        String [] tablePrefix = new String[] { "shop" };

        // 是否有父实体
        boolean hasSuperEntity = Boolean.TRUE;
        String[] superEntityColumns = {"id"};
        // 包配置
        String packageName = "com.climb";
        String moduleName = "spingcloud";

        MpGenerator mpGenerator = new MpGenerator();
        mpGenerator.generator(projectPath, projectName, author, url, username, password, tableNames, tablePrefix, hasSuperEntity,
                superEntityColumns, packageName, moduleName);
    }
}